<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
	<title>万医</title>
	<link rel="stylesheet" href="../css/activation.css">
	<script type="text/javascript">
		if(!document.cookie.match(/sessionid/))		
    	   window.location.href="./login.html";
	</script>
</head>
<body>	
 <section class="actPage1">
 	@@include("./activation/_page1.html")
 </section>
 <section class="actPage2 hide">
 	@@include("./activation/_page2.html")
 </section>
 <section class="actPage3 hide">
 	@@include("./activation/_page3.html")
 </section>
 <section class="actPage4 hide">
 	@@include("./activation/_page4.html")
 </section>
 <section class="actPage5 hide">
 	@@include("./activation/_page5.html")
 </section>
 <section class="actPage6 hide">
 	@@include("./activation/_page6.html")
 </section>
 <section class="actPage7 hide">
 	@@include("./activation/_page7.html")
 </section>
 <section class="actPage8 hide">
 	@@include("./activation/_page8.html")
 </section>
 <script type="text/template" id="template1">
	<%_.each(_.keys(itemList),function(item){
		if(item.toString()=="性状"||item.toString()=="运动"||item.toString()=="营养"||item.toString()=="指标") return true;%>
	<li class="navItem page4NavItem">
		<span class="itemCheck">
			<input type="checkbox" class="itemBox">
		</span>
		<div class="itemDetail">
			<a class="navigation1 page4Nav">
				<em class="catalog"><%=item%></em>
				<span class="rightShow">
					<i><%=_.keys(itemList[item]).length%>项</i>
					<i class="navAnimate"></i>
				</span>
			</a>
			<ul class='secondNav'>
				<%_.each(itemList[item], function(detail){%>
				<li class='navItem2'><i class="itemIcon"></i><%=detail%></li>
				<%});%>					
			</ul>
		</div>
	</li>
	<%});%>
	</script>
	<script type="text/template" id="template2">
			<a class="navigation1">
				<em><%=itemF%></em>
				<span class="rightShow">
					<i><%=_.keys(itemList[itemF]).length%>项</i>
					<i class="navDefault"></i>
				</span>
			</a>
			<ul class='secondNav'>	
				<%_.each(itemList[itemF], function(detail){%>
				<li class='navItem2'><i class="itemIcon"></i><%=detail%></li>
				<%});%>				
			</ul>
	</script>
	<script type="text/template" id="template3">
	<% var index=1;
	_.each(arrSorts,function(item){%>
	 <dl class="choiceItem cf">
	 	<dt><%=index++%>.<i><%=item%></i></dt>
	 	<%_.each(itemList[item], function(detail){%>
		<dd><%=detail%></dd>		
		<%});%>	
	 </dl>
	 <%});%>
	</script>
 <script type="text/javascript" src="../lib/_list.js"></script>
 <script type="text/javascript" src="../lib/zepto.js"></script>
 <script type="text/javascript" src="../lib/_underscore.js"></script>
 <script type="text/javascript">
 function appendZero(s){return ("00"+ s).substr((s+"").length);}
 var time=new Date();
 var theDate=time.getFullYear()+'-'+appendZero(time.getMonth() + 1) + "-"+appendZero(time.getDate());
 $('#birthday').attr('max',theDate)
 var tempHtml = _.template($("#template1").html())(itemList);
 	$("#tem1").html(tempHtml);
 var itemF;
 function showDetail(arrCheck){
	for(var i=0;i<5;i++){
		var key=arrCheck[i];
		for(itemF in itemList){
			if(itemF==key){
				var tempHtml = _.template($("#template2").html())(itemList[itemF]);
 				$('.actPage5 .navItem').eq(i).find(".itemDetail").html(tempHtml);
			}
		}		
	}
}
var itemK;
var arrSorts=[];
function showDetail2(arrSort){
	arrSorts=arrSort;
	var tempHtml1 = _.template($("#template3").html())(arrSorts);
	$('.actPage6 .choiceDetail1').html(tempHtml1);
	arrSorts=["性状","指标"];
	var tempHtml2 = _.template($("#template3").html())(arrSorts);
	$('.actPage6 .choiceDetail2').html(tempHtml2);
	arrSorts=["运动","营养"];
	tempHtml3 = _.template($("#template3").html())(arrSorts);
	$('.actPage6 .choiceDetail3').html(tempHtml3);
	$('.choiceDetail1 .choiceItem').eq(0).addClass('noborder');
	$('.choiceDetail2 .choiceItem').eq(0).addClass('noborder');
	$('.choiceDetail3 .choiceItem').eq(0).addClass('noborder');
}
 </script>
 <script src='../lib/_require.js' data-main='../js/activation.js'></script>
</body>
</html>